package asteroids.expression;

import asteroids.model.programs.*;

public class DoubleLiteral extends NumericExpression {
	private final double constantValue;

	public DoubleLiteral(double number) {
		super(null);
		if (Double.isNaN(number)) {
			this.constantValue = 0.001;
		} else {
			this.constantValue = number;
		}
	}

	@Override
	public double getValue(Program program) {
		return this.constantValue;
	}

}